package com.asit;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.util.ResourceUtils;

import javax.annotation.Resource;
import java.io.FileNotFoundException;

@SpringBootApplication
public class SpringbootKafkaAppliction extends SpringBootServletInitializer {
    static {
        try {
            String config = ResourceUtils.getFile("classpath:kafka_client_jaas.conf").getAbsolutePath();
            System.setProperty("java.security.auth.login.config",config);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
        SpringApplication.run(SpringbootKafkaAppliction.class,args);
    }
}
